package com.moon.spring.test;

import com.moon.spring.entity.UserEntity;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @ClassName: SpringTest02
 * @Description: TODD
 * @Author: 郭正洋
 * @Date: 2022/10/10 15:01
 * @Vsersion: 1.0.0
 **/
public class SpringTest02 {

	public static void main(String[] args) {
		ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("spring.xml");
		// 从容器里获取
		UserEntity userEntity = classPathXmlApplicationContext.getBean("userEntity", UserEntity.class);
		System.out.println(userEntity);
	}
}
